# -*- coding: utf-8 -*-
# @Time : 2023/11/27 8:41 AM 
# @Author : Wayne
# @Email : 1
# @File : find_key_in_array.py
# @Project : young_python_demo
# @DESCRIPTION : operation_records 是变量名，里面数据 data 是具体项目的信息，不需要根据取名规范

operation_records = [
        {
            "date":"2023-11-26T11:07Z",
            "result":"NONE",
            "type":"START_PROCESS_INSTANCE",
            # "userId":"0168666433-897478298"
        },
        {
            "date":"2023-11-26T11:08Z",
            "result":"AGREE",
            # "remark":"okok",
            "type":"EXECUTE_TASK_NORMAL",
            "userId":"0168666433-897478298"
        }
    ]

op_len = len(operation_records) -1
print(op_len)
for index, obj in enumerate(operation_records):
    if op_len == index:
        # 判断key是否在字典中
        if 'remark' in obj:
            print(obj['remark'])
        else:
            print("m")